package com.wangbo.decorator;

/**
 * 装饰器模式
 */
public class Client {
    public static void main(String[] args) {
        /**
         * 通过装饰器嵌套增强 Car 对象
         */
        Car flyAutoBmwCar= new FlyCarDecorator(new AutoCarDecorator(new BmwCar()));
        /**
         * Enable fly mode.
         * Enable auto mode.
         * Bmw run.
         */
        flyAutoBmwCar.run();

    }
}
